﻿{yun:}include file="$wapstyle/member/header.htm"{/yun}

<div class="bl-pbox">
	<div class="bl-pcon">
        <!------------投递结果开始------------>
        <div class="job-panel">
			<div class="js-tab">
                <div class="tab-h tabmenu_2">
                    <ul>
                        <li class="active"><span class="name">我的收藏</span></li>
                        <li><span class="name">我的投递</span></li>
                    </ul>
                </div>
                {yun:}if empty($msg){/yun}
                <!--我的收藏开始-->
                <div class="tab-con" style="display:block;">
                    <div class="js-slip-rightbox">
                    {yun:}foreach item=fav from=$favs{/yun}

                	<div class="job-postintro1 js-slip-rightdel">

                        {yun:}if empty($fav.company_logo){/yun}
                        <div class="postintro1-l"><img src="{yun:}$config.sy_weburl{/yun}/app/template/wap/images/img-2.png?v={yun:}$config.cachecode{/yun}"></div>
                        {yun:}else{/yun}
                        <div class="postintro1-l"><img src="{yun:}$fav.company_logo{/yun}"></div>
                        {yun:}/if{/yun}
                        <a href="{yun:}url m=job c=view id=$fav.job_id user_id=$user_id{/yun}" style="width: 100%;display: block;">
                    	<div class="postintro1-r">
                        	<div class="postintro1_t">
                                <span class="company">{yun:}$fav.com_name{/yun}</span>
                            </div>
                            <div class="postintro1_c">
                                <span class="job">{yun:}$fav.job_name{/yun}</span>
                                <span class="post">{yun:}$fav.city_name{/yun}</span>
                            </div>
                        	<div class="postintro1_c">
                            	<span class="money">{yun:}$fav.minsalary{/yun}~{yun:}$fav.maxsalary{/yun}</span>
                            	<span class="pop">{yun:}$fav.nature_name{/yun}</span>
                            </div>
                        	<div class="postintro1_b">
                                <span class="list">{yun:}$fav.bright_name{/yun}</span>
                                <!--<span class="list">提供工作餐</span>-->
                                <!--<span class="list">提供厂车</span>-->
                                <!--<span class="list">定期体检</span>-->
                                <!--<span class="list">高温补助</span>-->
                                <!--<span class="list"> 五险一金</span>-->
                            </div>
                        
                        </div>
                        </a>
                        <div class="slip-rightbtn"><a href="javascript:void(0)" onclick="isdel('index.php?c=collect&state=fav&user_id={yun:}$user_id{/yun}&del={yun:}$fav.id{/yun}')"><span class="font">删除</span></a></div>
                        <!--<a href="javascript:void(0)" onclick="isdel('index.php?c=collect&del={yun:}$v.id{/yun}')">取消收藏</a>-->

                    </div>

                    {yun:}/foreach{/yun}
                    </div>
                </div>

                <!--我的收藏结束-->

                <!--我投递的开始-->
                <div class="tab-con" style="display:none;">
                    <div class="js-slip-rightbox">
                    {yun:}foreach item=v from=$deliverys{/yun}
                        <!--<a href="index.php?c=collect_info">-->
                	<div class="js-slip-rightdel">
                        <div class="job-postintro2"  onclick="window.location.href='index.php?c=collect_info&user_id={yun:}$user_id{/yun}&id={yun:}$v.id{/yun}'">
                        {yun:}if empty($v.company_logo){/yun}
                        <div class="postintro2-l"><img src="{yun:}$config.sy_weburl{/yun}/app/template/wap/images/img-2.png?v={yun:}$config.cachecode{/yun}"></div>
                        {yun:}else{/yun}
                        <div class="postintro2-l"><img src="{yun:}$v.company_logo{/yun}"></div>
                        {yun:}/if{/yun}
                        <!--<div onclick="window.location.href='index.php?c=collect_info'">-->
                    	<div class="postintro2-r ">
                        	<div class="postintro2_t">
                                 <span class="time">{yun:}$v.time{/yun}</span>
                                 <span class="job">{yun:}$v.job_name{/yun}</span>
                            </div>
                        	<div class="postintro2_b">
                                {yun:}if $v.status == 1{/yun}
                                <span class="defeat-pop">该职位已关闭</span>
                                {yun:}else{/yun}
                                <span class="success-pop">投递成功</span>
                                {yun:}/if{/yun}
                                <div class="company">{yun:}$v.com_name{/yun}</div>
                            </div>
                        </div>
                        </div>
                        <!--</div>-->
                        <div class="slip-rightbtn"><a href="javascript:void(0)" onclick="isdel('index.php?c=collect&state=delivery&user_id={yun:}$user_id{/yun}&del={yun:}$v.id{/yun}')"><span class="font">删除</span></a></div>
                        <!--<div class="slip-rightbtn" name="info" id="info"><span class="font">删除</span></div>-->
                    </div>
                        <!--</a>-->
                    {yun:}/foreach{/yun}
                    </div>
                </div>
                <!--我投递的结束-->
            </div>
            {yun:}else{/yun}
            <div class="wap_member_no">
                <div class="wap_member_no_p1">
                    <div>{yun:}$msg{/yun}</div>
                    <!--<div><a class="wap_member_no_search" href="{yun:}url m=wap c=job{/yun}">搜索职位</a></div>-->
                </div>
            </div>
            {yun:}/if{/yun}

        </div>
        <!------------投递结果结束------------>        
    </div>
</div>
</body>

<!--<div class="pages"> {yun:}$pagenav{/yun}</div>-->
<script type="text/javascript">
    $(function(){
        //<!-----------页面tab切换开始---------->
        $(".js-tab .tab-h li").click(function(){
            var i=$(this).index();
            $(this).addClass("active").siblings("li").removeClass("active");
            $(this).parents(".js-tab").find(".tab-con").eq(i).show().siblings(".tab-con").hide();
        })
        //<!-----------页面tab切换结束---------->
        //<!--路径选择切换的js开始-->
        /* 路径滑动的js*/
        var startX;
        var startY;
        var endX;
        var endY;
        var myLocation;
        var realPoint;
        var $realTarget;
        $(".js-slip-rightbox").on('touchstart',$(".js-slip-rightdel"),function(e){
            startX = e.originalEvent.changedTouches[0].pageX,
                    startY = e.originalEvent.changedTouches[0].pageY;
            //确定移动点
            myLocation = e.originalEvent.changedTouches[0];
            realPoint = document.elementFromPoint(myLocation.pageX, myLocation.pageY);
            $realTarget = $(realPoint).parents(".js-slip-rightdel");
            $(".js-slip-rightdel").not($realTarget).animate({left:0},200);
        });
        $(".js-slip-rightbox").on('touchmove',$(".js-slip-rightdel"),function(e){
            //获取滑动屏幕时的X,Y
            endX = e.originalEvent.changedTouches[0].pageX,
                    endY = e.originalEvent.changedTouches[0].pageY;
            //获取滑动距离
            var distanceX = endX-startX;
            var distanceY = endY-startY;
            //设置滑动距离
            var settanceM=Math.abs(distanceX)<60?60:60;
            var settanceN=Math.abs(distanceX)<60?0:0;

            var domeleft=parseInt($realTarget.css("left"));

            //判断滑动方向(向右滑动)
            if(Math.abs(distanceX)>Math.abs(distanceY) && distanceX>0){
            if(domeleft<0){
            $realTarget.css("left",settanceN);
        }
        }else if(Math.abs(distanceX)>Math.abs(distanceY) && distanceX<0){
            $realTarget.css("left",-settanceM);
        }/*else if(Math.abs(distanceX)<Math.abs(distanceY) && distanceY<0){
             console.log('往上滑动');
             }else if(Math.abs(distanceX)<Math.abs(distanceY) && distanceY>0){
             console.log('往下滑动');
             }else{
             console.log('点击未滑动');
             }*/

        });

        $("body").click(function(){
            $(".js-slip-rightdel").animate({left:0},200)
        })


        //<!--路径选择切换的js结束-->

        })
    document.addEventListener("touchmove",function(e){
        e.stopPropagation();
        //e.preventDefault();
//
    })
</script>

